//订单详情页面
///team/GetOrderInfo
///team/GetGemOrderInfo
///team/GetRingOrderInfo
///team/GetParcelOrderInfo
///team/GetEmeraldOrderInfo
//参数：{"OrderID":123}

(function(){
	var orderDetail={
		init:function(){
			args = GetUrlParms();				
			if(args["ID"]!=undefined){						
				 orderID = args["ID"];//产品ID
			}
			if(args["type"]!=undefined){
				TYPE=args["type"];
			}
			this.bindEvents();
			this.getOrderDetail();
		},
		bindEvents:function(){
			var self=this;
			
		},
		getOrderDetail:function(){
			//myApp.showIndicator();
			var submitJson={};
			submitJson.OrderID=orderID;
			submitJson.GoodsType=TYPE;
			$.ajax({
				url:"/team/GetOrderNew",
				type:"POST",
				data:JSON.stringify(submitJson),
				contentType:"application/json; charset=utf8",
				success:function(result){
					var res=eval('('+result+')');
					if(res.msgcode==true){
						var data=res.msginfo;
						var data_parse=JSON.parse(data.InventoryAttribute);
						var cilentWidth=document.documentElement.clientWidth; 
						imgs = data_parse.Images.split("|");
						var $img="";
						var imgArray=[];
						 for (var i=0; i< imgs.length;i++) {
				            if (imgs[i].length > 10) {
				            	$img+='<div class="swiper-slide"><img src="'+imgs[i]+'" width='+cilentWidth+' height='+cilentWidth+' alt=""></div>';
				            	imgArray.push(imgs[i]);			            	
				            }else{
				            	$img+='<div class="swiper-slide"><img src="../../Images/no_img.jpg" width='+cilentWidth+' height='+cilentWidth+' alt=""></div>';
				            }
				       	}
						if(TYPE==2){//统包
							var parcelSalesExchangerate='';
                            parcelSalesExchangerate=(menu_team_parcels_columns_SalesExchangerate || RoleID == 1)?'<div class="col-50 exchangeRate"><label>'+_("销汇")+'：</label><b>'+(data.SalesExchangerate)+'</b></div>':''

                                var parcelConfirm=''; //卖/Ct￥  卖/Ct$
								if(menu_team_parcels_columns_ConfirmPrice || menu_team_parcels_columns_ConfirmUSD || RoleID == 1){
									parcelConfirm='<div class="row price_box">'
									if(menu_team_parcels_columns_ConfirmPrice || RoleID == 1){
										parcelConfirm+='<div class="col-50 CurrentRMB"><label>'+_("卖/Ct &nbsp")+'￥：</label><b>'+formatRMBPrice(data.ConfirmRMB)+'</b></div>'
									}
									if(menu_team_parcels_columns_ConfirmUSD || RoleID == 1){
										parcelConfirm+='<div class="col-50 CurrentUSD"><label>'+_("卖/Ct &nbsp")+'$：</label><b>'+formatUSDPrice(data.ConfirmUSD)+'</b></div>'
									}
									parcelConfirm+="</div>"
								}

								var parcelConfirmCount=''  //卖￥ 卖$
								if(menu_team_parcels_columns_ConfirmPrice || menu_team_parcels_columns_ConfirmUSD || RoleID == 1){
                                    parcelConfirmCount='<div class="row price_box">'
									if(menu_team_parcels_columns_ConfirmPrice || RoleID == 1){
                                        parcelConfirmCount+='<div class="col-50 CurrentRMB"><label>'+_("卖")+'￥：</label><b>'+formatRMBPrice((data.ConfirmRMB)*(data.InventoryCount))+'</b></div>'
                                    }
                                    if(menu_team_parcels_columns_ConfirmUSD || RoleID == 1){
                                        parcelConfirmCount+='<div class="col-50 CurrentUSD"><label>'+_("卖")+'$：</label><b>'+formatUSDPrice((data.ConfirmUSD)*(data.InventoryCount))+'</b></div>'
									}
                                    parcelConfirmCount+='</div>'
								}

								var parcel_ReceiptStatus_CustomerNickName='' //收款  客户
								if(menu_team_parcels_columns_PaymentStatus || menu_team_parcels_columns_CustomerNickName || RoleID == 1){
									parcel_ReceiptStatus_CustomerNickName='<div class="row">'
									if(menu_team_parcels_columns_PaymentStatus || RoleID == 1){
										parcel_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("收款")+'：</label><b>'+PaymentStatusFormat(data.ReceiptStatus)+'</b></div>'
									}
									if(menu_team_parcels_columns_CustomerNickName || RoleID == 1){
										parcel_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("客户")+'：</label><b>'+data.CustomerNickName+'</b></div>'
									}
                                    parcel_ReceiptStatus_CustomerNickName+='</div>'
								}

								var parcel_Balance_USDBalance='' //余额 ￥ $
								if(menu_team_parcels_columns_Balance || menu_team_parcels_columns_USDBalance || RoleID == 1){
                                    parcel_Balance_USDBalance='<div class="row">'
									if(menu_team_parcels_columns_Balance || RoleID == 1){
                                        parcel_Balance_USDBalance+='<div class="col-50 CurrentRMB"><label>'+_("余")+'￥：</label><b>'+data.Balance+'</b></div>'
									}
                                    if(menu_team_parcels_columns_USDBalance || RoleID == 1){
                                        parcel_Balance_USDBalance+='<div class="col-50 CurrentUSD"><label>'+_("余")+'$：</label><b>'+data.USDBalance+'</b></div>'
                                    }
                                    parcel_Balance_USDBalance+='</div>'
								}

								var parcel_SalesUserName_PurchaseUserName=''; //业务 采购
								if(menu_team_parcels_columns_SalesUserName || menu_team_parcels_columns_PurchaseUserName || RoleID == 1){
                                    parcel_SalesUserName_PurchaseUserName='<div class="row">'
                                   if(menu_team_parcels_columns_SalesUserName || RoleID == 1){
                                       parcel_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("业务")+'：</label><b>'+data.SalesUserName+'</b></div>'
									}
									if(menu_team_parcels_columns_PurchaseUserName || RoleID == 1){
                                        parcel_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("采购")+'：</label><b>'+NullFormat(data.PurchaseUserName)+'</b></div>'
									}
                                    parcel_SalesUserName_PurchaseUserName+='</div>'
								}

								var parcel_PurchaseExchangerate_Supplier='';//采汇 供应商
								if(menu_team_parcels_columns_PurchaseExchangerate || menu_team_parcels_columns_SupplierCode || RoleID == 1){
                                    parcel_PurchaseExchangerate_Supplier='<div class="row">'
									if(menu_team_parcels_columns_PurchaseExchangerate || RoleID == 1){
                                        parcel_PurchaseExchangerate_Supplier+='<div class="col-50 exchangeRate"><label>'+_("采汇")+'：</label><b>'+data.PurchaseExchangerate+'</b></div>'
									}
									if(isHideSupplier == "1"){
										if(menu_team_parcels_columns_SupplierCode || RoleID == 1){
											parcel_PurchaseExchangerate_Supplier+='<div class="col-50"><label>'+_("供应商")+'：</label><b>'+data.Supplier+'</b></div>'
										}
									}

                                    parcel_PurchaseExchangerate_Supplier+='</div>'
								}

								var parcel_PurchaseUSD_PurchaseRMB='' ; //买/Ct  $ ￥
								if(menu_team_parcels_columns_PriceUSD_per || menu_team_parcels_columns_PurchaseRMB_per || RoleID == 1){
                                    parcel_PurchaseUSD_PurchaseRMB='<div class="row price_box">'
									if(menu_team_parcels_columns_PriceUSD_per || RoleID == 1){
                                        parcel_PurchaseUSD_PurchaseRMB+='<div class="col-50 CurrentUSD"><label>'+_("买/Ct &nbsp")+'$：</label><b>'+formatUSDPrice(data.PurchaseUSD)+'</b></div>'
									}
									if(menu_team_parcels_columns_PurchaseRMB_per || RoleID == 1){
                                        parcel_PurchaseUSD_PurchaseRMB+='<div class="col-50 CurrentRMB"><label>'+_("买/Ct &nbsp")+'￥：</label><b>'+formatRMBPrice(data.PurchaseRMB)+'</b></div>'
									}
                                    parcel_PurchaseUSD_PurchaseRMB+='</div>'
								}

								var parcel_PurchaseUSD_PurchaseRMB_InventoryCount=''; //买￥ $
								if(menu_team_parcels_columns_PriceUSD || menu_team_parcels_columns_PurchaseRMB || RoleID == 1){
                                    parcel_PurchaseUSD_PurchaseRMB_InventoryCount='<div class="row price_box">'
									if(menu_team_parcels_columns_PriceUSD || RoleID == 1){
                                        parcel_PurchaseUSD_PurchaseRMB_InventoryCount+='<div class="col-50 CurrentUSD"><label>'+_("买")+'$：</label><b>'+formatUSDPrice((data.PurchaseUSD)*(data.InventoryCount))+'</b></div>'
									}
									if(menu_team_parcels_columns_PurchaseRMB || RoleID == 1){
                                        parcel_PurchaseUSD_PurchaseRMB_InventoryCount+= '<div class="col-50 CurrentRMB"><label>'+_("买")+'￥：</label><b>'+formatRMBPrice((data.PurchaseRMB)*(data.InventoryCount))+'</b></div>'
									}
                                    parcel_PurchaseUSD_PurchaseRMB_InventoryCount+='</div>'
								}

								var parcel_PaymentStatus=''//付款
								if(menu_team_parcels_columns_ReceiptStatus || RoleID == 1){
                                    parcel_PaymentStatus= '<div class="row">'+
                                       '<div class="col-50"><label>'+_("付款")+'：</label><b>'+ReceiptStatusFormat(data.PaymentStatus)+'</b></div></div>'
								}


							var $div=[
								'<div class="row">',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',UserOrderStatusFormat(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
								'<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("parcels",data_parse.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
                                	'<div class="col-50"><label>'+_("形状")+'：</label><b>',GetText("parcels",data_parse.Category,data_parse.Shape,"Shape"),'</b></div>',
									'<div class="col-50"><label>'+_("大小")+'：</label><b>',data_parse.Size,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("颜色")+'：</label><b>',GetText("parcels",data_parse.Category,data_parse.Color,"Color"),'</b></div>',
							        '<div class="col-50"><label>'+_("净度")+'：</label><b>',GetText("parcels",data_parse.Category,data_parse.Clarity,"Clarity"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("购买重量")+'：</label><b>',data.InventoryCount,'</b></div>',
                                	parcelSalesExchangerate,
						     	'</div>',
                                parcelConfirm,
                                parcelConfirmCount,
                                parcel_ReceiptStatus_CustomerNickName,
								parcel_Balance_USDBalance,
                               	parcel_SalesUserName_PurchaseUserName,
								parcel_PurchaseExchangerate_Supplier,
								parcel_PurchaseUSD_PurchaseRMB,
								parcel_PurchaseUSD_PurchaseRMB_InventoryCount,
								parcel_PaymentStatus,
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',GetText("parcels",data_parse.Category,data_parse.Place,"Place"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("下单")+'：</label><b>',DateTimeFormat(data.CreateTime) ,'</b></div>',
							        '<div class="col-50"><label>'+_("出货")+'：</label><b>',DateFormat(data.ShipTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("到货")+'：</label><b>',DateFormat(data.ArrivalTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("大小描述")+'：</label><b>',data_parse.SizeDesc,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("颜色描述")+'：</label><b>',data_parse.ColorDesc,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("净度描述")+'：</label><b>',data_parse.ClarityDesc,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("其他描述")+'：</label><b>',data.Descript,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'<div>',
							].join('');
						}else if(TYPE==3){//成品
							var ring_SalesExchangerate=''; //销汇
							if(menu_team_rings_columns_SalesExchangerate || RoleID == 1){
                                ring_SalesExchangerate='<div class="col-50 exchangeRate"><label>'+_("销汇")+'：</label><b>'+(data.SalesExchangerate)+'</b></div>'
							}

							var ring_ConfirmRMB_ConfirmUSD=''; //卖￥ $
							if(menu_team_rings_columns_ConfirmPrice|| menu_team_rings_columns_ConfirmUSD || RoleID == 1){
                                ring_ConfirmRMB_ConfirmUSD+='<div class="row price_box">'
								if(menu_team_rings_columns_ConfirmPrice || RoleID == 1){
                                	ring_ConfirmRMB_ConfirmUSD+='<div class="col-50 CurrentRMB"><label>'+_("卖")+'￥：</label><b>'+formatRMBPrice(data.ConfirmRMB)+'</b></div>'
								}
								if(menu_team_rings_columns_ConfirmUSD || RoleID == 1){
                                    ring_ConfirmRMB_ConfirmUSD+='<div class="col-50 CurrentUSD"><label>'+_("卖")+'$：</label><b>'+formatUSDPrice(data.ConfirmUSD)+'</b></div>'
								}
                                ring_ConfirmRMB_ConfirmUSD+='</div>'
							}

							var ring_ReceiptStatus_CustomerNickName='';//收款 客户
							if(menu_team_rings_columns_PaymentStatus || menu_team_rings_columns_CustomerNickName || RoleID == 1){
                                ring_ReceiptStatus_CustomerNickName='<div class="row">'
								if(menu_team_rings_columns_PaymentStatus || RoleID == 1){
                                    ring_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("收款")+'：</label><b>'+PaymentStatusFormat(data.ReceiptStatus)+'</b></div>'
								}
								if(menu_team_rings_columns_CustomerNickName || RoleID == 1){
                                    ring_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("客户")+'：</label><b>'+data.CustomerNickName+'</b></div>'
								}
                                ring_ReceiptStatus_CustomerNickName+='</div>'
							}

							var ring_Balance_USDBalance=''; //余额￥ $
							if(menu_team_rings_columns_Balance || menu_team_rings_columns_USDBalance || RoleID == 1){
                                ring_Balance_USDBalance='<div class="row">'
								if(menu_team_rings_columns_Balance || RoleID == 1){
                                    ring_Balance_USDBalance+='<div class="col-50 CurrentRMB"><label>'+_("余额")+'￥：</label><b>'+data.Balance +'</b></div>'
								}
								if(menu_team_rings_columns_USDBalance || RoleID == 1){
                                    ring_Balance_USDBalance+='<div class="col-50 CurrentUSD"><label>'+_("余额")+'$：</label><b>'+data.USDBalance +'</b></div>'
								}
                                ring_Balance_USDBalance+='</div>'
							}

							var ring_SalesUserName_PurchaseUserName=''; //业务 采购
							if(menu_team_rings_columns_SalesUserName  || menu_team_rings_columns_PurchaseUserName || RoleID == 1){
                                ring_SalesUserName_PurchaseUserName='<div class="row">'
								if(menu_team_rings_columns_SalesUserName || RoleID == 1){
                                    ring_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("业务")+'：</label><b>'+data.SalesUserName+'</b></div>'
								}
								if(menu_team_rings_columns_PurchaseUserName || RoleID == 1){
                                    ring_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("采购")+'：</label><b>'+NullFormat(data.PurchaseUserName) +'</b></div>'
								}
                                ring_SalesUserName_PurchaseUserName+='</div>'
							}

							var ring_Supplier_PurchaseExchangerate=''; //供应商 采汇
							if(menu_team_rings_columns_SupplierCode || menu_team_rings_columns_PurchaseExchangerate || RoleID == 1){
                                ring_Supplier_PurchaseExchangerate='<div class="row">'
								if(isHideSupplier == "1"){
									if(menu_team_rings_columns_SupplierCode || RoleID == 1){
										if(menu_team_rings_columns_supplier_detail || RoleID == 1){
											ring_Supplier_PurchaseExchangerate+='<div class="col-50"><label>'+_("供应商")+'：</label><b style="color:red" onclick="Contact_Js(this)" value="' + data.Supplier + '">'+data.Supplier+'</b></div>'
										}else{
											ring_Supplier_PurchaseExchangerate+='<div class="col-50"><label>'+_("供应商")+'：</label><b>'+data.Supplier+'</b></div>'
										}
									}
								}


								if(menu_team_rings_columns_PurchaseExchangerate || RoleID == 1){
                                    ring_Supplier_PurchaseExchangerate+='<div class="col-50 exchangeRate"><label>'+_("采汇")+'：</label><b>'+data.PurchaseExchangerate +'</b></div>'
								}
                                ring_Supplier_PurchaseExchangerate+='</div>'
							}

							var ring_PurchaseUSD_PurchaseRMB=''; //买$ ￥
							if(menu_team_rings_columns_PriceUSD  || menu_team_rings_columns_PurchaseRMB || RoleID == 1){
                                ring_PurchaseUSD_PurchaseRMB='<div class="row">'
								if(menu_team_rings_columns_PriceUSD || RoleID == 1){
                                    ring_PurchaseUSD_PurchaseRMB+='<div class="col-50 CurrentUSD"><label>'+_("买")+'$：</label><b>'+formatUSDPrice(data.PurchaseUSD)+'</b></div>'
								}
								if(menu_team_rings_columns_PurchaseRMB || RoleID == 1){
                                    ring_PurchaseUSD_PurchaseRMB+='<div class="col-50 CurrentRMB"><label>'+_("买")+'￥：</label><b>'+formatRMBPrice(data.PurchaseRMB)+'</b></div>'
								}
                                ring_PurchaseUSD_PurchaseRMB+='</div>'
							}
							var ring_PaymentStatus=''; //付款
							if(menu_team_rings_columns_ReceiptStatus || RoleID == 1){
                                ring_PaymentStatus='<div class="col-50"><label>'+_("付款")+'：</label><b>'+ReceiptStatusFormat(data.PaymentStatus) +'</b></div>'
							}

							var $div=[
								'<div class="row">',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',UserOrderStatusFormat(data.OrderStatus),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("系列")+'：</label><b>',data_parse.Series,'</b></div>',
							        '<div class="col-50"><label>'+_("款号")+'：</label><b>',data_parse.StyleNo,'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("inlays",data_parse.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("现货")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.IsStock,"IsStock"),'</b></div>',
							        '<div class="col-50"><label>'+_("风格")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Style,"Style"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("主石")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Type,"Type"),'</b></div>',
							        '<div class="col-50"><label>'+_("总重")+'：</label><b>',data_parse.Weight,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("主石重量")+'：</label><b>',data_parse.MainWeight,'</b></div>',
							        '<div class="col-50"><label>'+_("副石重量")+'：</label><b>',data_parse.SideWeight,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("主石颜色")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.MainColor,"MainColor"),'</b></div>',
							        '<div class="col-50"><label>'+_("主石净度")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.MainClarity,"MainClarity"),'</b></div>',							        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("材质")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Material,"Material"),'</b></div>',
							        // '<div class="col-50 exchangeRate"><label>'+_("销汇")+'：</label><b>',(data.SalesExchangerate),'</b></div>',
									ring_SalesExchangerate,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("成品证书")+'：</label><b>',data_parse.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("主石证书")+'：</label><b>',data_parse.MainCertType,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data_parse.MainCertNo,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data_parse.Measurement,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("状态")+'：</label><b>',StatusFormat(data.Status),'</b></div>',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Place,"Place"),'</b></div>',
						     	'</div>',
								ring_ConfirmRMB_ConfirmUSD,
								ring_ReceiptStatus_CustomerNickName,
								ring_Balance_USDBalance,
								ring_SalesUserName_PurchaseUserName,
								ring_Supplier_PurchaseExchangerate,
								ring_PurchaseUSD_PurchaseRMB,
						     	'<div class="row">',
									ring_PaymentStatus,
							        '<div class="col-50"><label>'+_("未清")+'：</label><b>',data.ReceiptPrice ,'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("下单")+'：</label><b>',DateTimeFormat(data.CreateTime) ,'</b></div>',
							        '<div class="col-50"><label>'+_("发货")+'：</label><b>',DateFormat(data.ShipTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("到货")+'：</label><b>',DateFormat(data.ArrivalTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("描述")+'：</label><b>',data.Remark,'</b></div>',
						     	'<div>',						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'<div>',
							].join('');
						}else if(TYPE==4){//彩宝
							var gem_order_salesExchangerate=''; //销汇
							var gem_order_price=''; //卖￥ $
							var gem_order_rec_nickname=''; //付款 客户
							var gem_order_balance=''; //余额 ￥ $
							var gem_order_SalesUserName_PurchaseUserName=''; //业务 采购
							var gem_order_Supplier_PurchaseExchangerate=''; //供应商 采汇
							var gem_order_purchasePrice=''; // 买￥ $
							var gem_order_ReceiptStatus=''; //付款
							if(menu_team_gems_columns_SalesExchangerate){
                                gem_order_salesExchangerate='<div class="col-50 exchangeRate"><label>'+_("销汇")+'：</label><b>'+(data.SalesExchangerate)+'</b></div>'
							}
							if(menu_team_gems_columns_ConfirmPrice || menu_team_gems_columns_ConfirmUSD){
                                gem_order_price='<div class="row price_box">';
                                if(menu_team_gems_columns_ConfirmPrice){
                                    gem_order_price+= '<div class="col-50 CurrentRMB"><label>'+_("卖")+'￥：</label><b>'+formatRMBPrice(data.ConfirmRMB)+'</b></div>';
								}
								if(menu_team_gems_columns_ConfirmUSD){
                                    gem_order_price+= '<div class="col-50 CurrentUSD"><label>'+_("卖")+'$：</label><b>'+formatUSDPrice(data.ConfirmUSD)+'</b></div>';
								}
                                gem_order_price+='</div>';
							}

							if(menu_team_gems_columns_ReceiptStatus || menu_team_gems_columns_CustomerNickName){
                                gem_order_rec_nickname='<div class="row">';
                                if(menu_team_gems_columns_ReceiptStatus){
                                    gem_order_rec_nickname+='<div class="col-50"><label>'+_("付款")+'：</label><b>'+ReceiptStatusFormat(data.ReceiptStatus) +'</b></div>';
								}
								if(menu_team_gems_columns_CustomerNickName){
                                    gem_order_rec_nickname+='<div class="col-50"><label>'+_("客户")+'：</label><b>'+NullFormat(data.NickName) +'</b></div>';
								}
                                gem_order_rec_nickname+='</div>';
							}

							if(menu_team_gems_columns_Balance || menu_team_gems_columns_USDBalance){
                                gem_order_balance='<div class="row">';
                                if(menu_team_gems_columns_Balance){
                                	gem_order_balance+='<div class="col-50 CurrentRMB"><label>'+_("余额")+'￥：</label><b>'+data.Balance +'</b></div>';
								}
								if(menu_team_gems_columns_USDBalance){
                                    gem_order_balance+= '<div class="col-50 CurrentUSD"><label>'+_("余额")+'$：</label><b>'+data.USDBalance +'</b></div>';
								}
                                gem_order_balance+='</div>';
							}

							if(menu_team_gems_columns_SalesUserName || menu_team_gems_columns_PurchaseUserName){
                                gem_order_SalesUserName_PurchaseUserName='<div class="row">';
                                if(menu_team_gems_columns_SalesUserName){
                                    gem_order_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("业务")+'：</label><b>'+NullFormat(data.SalesUserName)+'</b></div>';
								}
								if(menu_team_gems_columns_PurchaseUserName){
                                    gem_order_SalesUserName_PurchaseUserName+='<div class="col-50"><label>'+_("采购")+'：</label><b>'+NullFormat(data.PurchaseUserName) +'</b></div>';
								}
                                gem_order_SalesUserName_PurchaseUserName+='</div>';
							}


                            if(menu_team_gems_columns_PurchaseUserName || menu_team_gems_columns_PurchaseExchangerate){
                                gem_order_Supplier_PurchaseExchangerate='<div class="row">';
                               if(menu_team_gems_columns_PurchaseUserName){
                                   gem_order_Supplier_PurchaseExchangerate+='<div class="col-50"><label>'+_("供应商")+'：</label><b>'+data.Supplier+'</b></div>';
                            	}
                            	if(menu_team_gems_columns_PurchaseExchangerate){
                                    gem_order_Supplier_PurchaseExchangerate+='<div class="col-50 exchangeRate"><label>'+_("采汇")+'：</label><b>'+data.PurchaseExchangerate +'</b></div>';
                            	}
                               gem_order_Supplier_PurchaseExchangerate+='</div>';
                            }

							if(menu_team_gems_columns_PriceUSD || menu_team_gems_columns_PurchaseRMB){
                                gem_order_purchasePrice='<div class="row">';
                                if(menu_team_gems_columns_PriceUSD){
                                    gem_order_purchasePrice+='<div class="col-50 CurrentUSD"><label>'+_("买")+'$：</label><b>'+formatUSDPrice(data.PurchaseUSD)+'</b></div>';
								}
								if(menu_team_gems_columns_PurchaseRMB){
                                    gem_order_purchasePrice+='<div class="col-50 CurrentRMB"><label>'+_("买")+'￥：</label><b>'+formatRMBPrice(data.PurchaseRMB) +'</b></div>';
								}
                                gem_order_purchasePrice+='</div>';
							}

							if(menu_team_gems_columns_ReceiptStatus){
                                gem_order_ReceiptStatus= '<div class="row">'+
                                   '<div class="col-50"><label>'+_("付款")+'：</label><b>'+ReceiptStatusFormat(data.ReceiptStatus) +'</b></div>'+
                                '</div>';
							}



							var $div=[
								'<div class="row">',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',UserOrderStatusFormat(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("gems",data_parse.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("形状")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Shape,"Shape"),'</b></div>',
							        '<div class="col-50"><label>'+_("颜色")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Color,"Color"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("证书")+'：</label><b>',data_parse.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data_parse.CertNo,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("处理")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Process,"Process"),'</b></div>',
							        '<div class="col-50"><label>'+_("切工")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Cut,"Cut"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("切工方式")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.CutMethod,"CutMethod"),'</b></div>',
							        '<div class="col-50"><label>'+_("油性")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Oiliness,"Oiliness"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("总重")+'：</label><b>',data_parse.Weight,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data_parse.Measurement,'</b></div>',
						     	'</div>',						     			     
								'<div class="row">',
							        '<div class="col-50"><label>'+_("产地")+'：</label><b>',GetText("gems",data_parse.Category,data_parse.Place,"Place"),'</b></div>',
									gem_order_salesExchangerate,
						     	'</div>',
								gem_order_price,
								gem_order_rec_nickname,
								gem_order_balance,
								gem_order_SalesUserName_PurchaseUserName,
						     	gem_order_Supplier_PurchaseExchangerate,
								gem_order_purchasePrice,
								gem_order_ReceiptStatus,
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("下单")+'：</label><b>',DateTimeFormat(data.CreateTime) ,'</b></div>',
							        '<div class="col-50"><label>'+_("发货")+'：</label><b>',DateFormat(data.ShipTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("到货")+'：</label><b>',DateFormat(data.ArrivalTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("出货单号")+'：</label><b>',data.ShipNo ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("描述")+'：</label><b>',data.Comments ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'<div>',
							].join('');
						}else if(TYPE==5){//翡翠emeralds
							var $div=[
								'<div class="row">',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("emeralds",data.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("名称")+'：</label><b>',data.Name,'</b></div>',
							        '<div class="col-50"><label>'+_("类别")+'：</label><b>',GetText("emeralds",data.Category,data.Type,"Type"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("类别细分")+'：</label><b>',getEmeraldType(data.Type2),'</b></div>',
							        '<div class="col-50"><label>'+_("种地")+'：</label><b>',GetText("emeralds",data.Category,data.Texture,"Texture"),'</b></div>',
							       
						     	'</div>',
						     	'<div class="row">',
						     	 	'<div class="col-50"><label>'+_("证书")+'：</label><b>',data.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data.CertNo,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("颜色")+'：</label><b>',data.Color,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data.Measurement,'</b></div>',							        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',data.Country,data.State,'</b></div>',
//							        '<div class="col-50"><label>价格：</label><b>',data.ConfirmPrice,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.PaymentStatus?_("已支付"):_("未支付"),'</b></div>',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',GetText("gems",data.Category,data.Place,"Place"),'</b></div>',
						     	'</div>',
						     		'<div class="row price_box">',
							        '<div class="col-50 CurrentRMB"><label>'+_("卖")+'￥：</label><b>',formatRMBPrice(data.ConfirmPrice),'</b></div>',
							        '<div class="col-50 CurrentUSD"><label>'+_("卖")+'$：</label><b>',formatUSDPrice(data.ConfirmPrice/data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("付款")+'：</label><b>',ReceiptStatusFormat(data.ReceiptStatus) ,'</b></div>',
							        '<div class="col-50"><label>'+_("客户")+'：</label><b>',data.NickName ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50 CurrentRMB"><label>'+_("余额")+'￥：</label><b>',data.Balance ,'</b></div>',
							        '<div class="col-50 CurrentUSD"><label>'+_("余额")+'$：</label><b>',data.USDBalance ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("业务")+'：</label><b>',data.SalesUserName,'</b></div>',
							        '<div class="col-50"><label>'+_("采购")+'：</label><b>',data.PurchaseUserName ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("供应商")+'：</label><b>',data.Supplier,'</b></div>',
							        '<div class="col-50 exchangeRate"><label>'+_("采汇")+'：</label><b>',data.PurchaseExchangerate ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50 CurrentUSD"><label>'+_("买")+'$：</label><b>',formatUSDPrice(data.PurchaseRMB/data.PurchaseExchangerate),'</b></div>',
							        '<div class="col-50 CurrentRMB"><label>'+_("买")+'￥：</label><b>',formatRMBPrice(data.PurchaseRMB) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("付款")+'：</label><b>',ReceiptStatusFormat(data.ReceiptStatus) ,'</b></div>',
							        '<div class="col-50"><label>'+_("未清")+'：</label><b>',data.ReceiptPrice ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("下单")+'：</label><b>',DateTimeFormat(data.AddTime) ,'</b></div>',
							        '<div class="col-50"><label>'+_("发货")+'：</label><b>',DateFormat(data.ShipTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("到货")+'：</label><b>',DateFormat(data.ArrivalTime) ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("出货单号")+'：</label><b>',data.ShipNo ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("描述")+'：</label><b>',data.Comments ,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("采购")+'：</label><b>',data.PurchaseRemarks,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("物流")+'：</label><b>',data.GoodsRemark,'</b></div>',
						     	'<div>',
							].join('');
						}else if(TYPE == 7){

							//权限
							var strConfirmRMB;
							if(menu_ordering_inlaysettings_ConfirmPrice || RoleID == 1 ){
                                strConfirmRMB= '<div class="col-50"><label>'+_("卖&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;￥")+'：</label><b style="color:red">'+formatRMBPrice(data.ConfirmRMB)+'</b></div>';

                            }
                            var inlaysettings_ReceiptStatus_CustomerNickName='' //收款  客户
                            if(menu_team_inlaysettings_columns_PaymentStatus || menu_team_inlaysettings_columns_CustomerNickName || RoleID == 1 ){
                                inlaysettings_ReceiptStatus_CustomerNickName='<div class="row">'
                                if(menu_team_inlaysettings_columns_PaymentStatus || RoleID == 1){
                                    inlaysettings_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("收&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;款")+'：</label><b>'+PaymentStatusFormat(data.ReceiptStatus)+'</b></div>'
                                }
                                if(menu_team_inlaysettings_columns_CustomerNickName || RoleID == 1){
                                    inlaysettings_ReceiptStatus_CustomerNickName+='<div class="col-50"><label>'+_("客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户")+'：</label><b>'+data.CustomerNickName+'</b></div>'
                                }
                                inlaysettings_ReceiptStatus_CustomerNickName+='</div>'
                            }

                            var strInlaysettingsBalance_SalesUserName; //余￥
                            if(menu_team_inlaysettings_columns_Balance || menu_team_inlaysettings_columns_SalesUserName || RoleID == 1){
                                strInlaysettingsBalance_SalesUserName='<div class="row">'
                                if(menu_team_inlaysettings_columns_Balance || RoleID == 1){
                                    strInlaysettingsBalance_SalesUserName+='<div class="col-50"><label>'+_("余&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;￥")+'：</label><b>'+data.Balance+'</b></div>'
                                }
                                if(menu_team_inlaysettings_columns_SalesUserName || RoleID == 1){
                                    strInlaysettingsBalance_SalesUserName+='<div class="col-50"><label>'+_("业&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;物")+'：</label><b>'+data.SalesUserName+'</b></div>'
                                }
                                strInlaysettingsBalance_SalesUserName+='</div>'
                            }

                            var strinlaysettingsPurchaseUserName_Supplier; //采购 供应商
							if(menu_team_inlaysettings_columns_PurchaseUserName || menu_team_inlaysettings_columns_SupplierCode || RoleID == 1){
                                strinlaysettingsPurchaseUserName_Supplier='<div class="row">'
								if(menu_team_inlaysettings_columns_PurchaseUserName || RoleID == 1){
                                    strinlaysettingsPurchaseUserName_Supplier+='<div class="col-50"><label>'+_("采&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;购")+'：</label><b>'+NullFormat(data.PurchaseUserName)+'</b></div>'

                                }
                                if(isHideSupplier == "1"){
									if(menu_team_inlaysettings_columns_SupplierCode || RoleID == 1){
										if(menu_team_inlaysettings_columns_supplier_detail || RoleID == 1){
											strinlaysettingsPurchaseUserName_Supplier+='<div class="col-50"><label>'+_("供&nbsp;&nbsp;应&nbsp;&nbsp;商")+'：</label><b style="color:red" onclick="Contact_Js(this)" value="' + data.Supplier + '">'+data.Supplier+'</b></div>'
										}else{
											strinlaysettingsPurchaseUserName_Supplier+='<div class="col-50"><label>'+_("供&nbsp;&nbsp;应&nbsp;&nbsp;商")+'：</label><b>'+data.Supplier+'</b></div>'
										}

									}
								}

                                strinlaysettingsPurchaseUserName_Supplier+='</div>'
							}

							var strinlaysettingsShipNo_PaymentStatus; //出货单号 付款
							if(menu_team_inlaysettings_columns_ShipNo || menu_team_inlaysettings_columns_ReceiptStatus || RoleID == 1){
                                strinlaysettingsShipNo_PaymentStatus='<div class="row">'
								if(menu_team_inlaysettings_columns_ShipNo || RoleID == 1){
                                    strinlaysettingsShipNo_PaymentStatus+='<div class="col-50"><label>'+_("出货单号")+'：</label><b>'+NullFormat(data.ShipNo)+'</b></div>'
								}
								if(menu_team_inlaysettings_columns_ReceiptStatus || RoleID == 1){
                                    strinlaysettingsShipNo_PaymentStatus+='<div class="col-50"><label>'+_("付&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;款")+'：</label><b>'+ReceiptStatusFormat(data.PaymentStatus)+'</b></div>'
								}
                                strinlaysettingsShipNo_PaymentStatus+='</div>'
							}

                            var $div=[
                                '<div class="row">',
                                '<div class="col-100"><label>'+_("状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("货&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
                                '<div class="col-50"><label>'+_("款&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号")+'：</label><b>',data_parse.StyleNo,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("系列名称")+'：</label><b>',data_parse.Series,'</b></div>',
                                '<div class="col-50"><label>'+_("主石工艺")+'：</label><b>',GetText("inlaysettings",1,data_parse.Technics,"Technics"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("材&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;质")+'：</label><b>',GetText("inlaysettings",1,data_parse.Material,"Material"),'</b></div>',
                                '<div class="col-50"><label>'+_("品&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类")+'：</label><b>',GetText("inlaysettings",1,data_parse.Type,"Type"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("风&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格")+'：</label><b>',GetText("inlaysettings",1,data_parse.Style,"Style"),'</b></div>',
                                '<div class="col-50"><label>'+_("形&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;状")+'：</label><b>',GetText("inlaysettings",1,data_parse.MainShape,"MainShape"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("主石重量")+'：</label><b>',data_parse.MainWeight,'</b></div>',
                                '<div class="col-50"><label>'+_("总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;重")+'：</label><b>',data_parse.TotalWeight,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("净&nbsp;&nbsp;金&nbsp;&nbsp;重")+'：</label><b>',data_parse.NetGoldWeight,'</b></div>',
                                '<div class="col-50"><label>'+_("副石重量")+'：</label><b>',data_parse.SideWeight,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("副石粒数")+'：</label><b>',data_parse.SideNum,'</b></div>',
                                '<div class="col-50"><label>'+_("副石工费")+'：</label><b>',data_parse.CustomerSideLaborFee,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("副石总额")+'：</label><b>',data_parse.CustomerSidePrice,'</b></div>',
                                '<div class="col-50"><label>'+_("金&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价")+'：</label><b>',data_parse.CustomerGoldPrice,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("工&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费")+'：</label><b>',data_parse.CustomerLaborFee,'</b></div>',
                                '<div class="col-50"><label>'+_("损&nbsp;&nbsp;&nbsp;&nbsp;耗%")+'：</label><b>',(data_parse.CustomerWastage*100).toFixed(0),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("保&nbsp;&nbsp;险&nbsp;&nbsp;费")+'：</label><b>',data_parse.CustomerInsurance,'</b></div>',
                                	strConfirmRMB,
								'</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("尺&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;寸")+'：</label><b>',data_parse.Measurement,'</b></div>',
                                '<div class="col-50"><label>'+_("出售方式")+'：</label><b>',GetText("inlaysettings",1,data_parse.IsStock,"IsStock"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("所&nbsp;&nbsp;在&nbsp;&nbsp;地")+'：</label><b>',GetText("inlaysettings",1,data_parse.Country,"Country"),data_parse.State,'</b></div>',
                                '<div class="col-50"><label>'+_("原&nbsp;&nbsp;净&nbsp;&nbsp;重")+'：</label><b>',data_parse.NetGoldWeight,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("原&nbsp;&nbsp;金&nbsp;&nbsp;价")+'：</label><b>',data_parse.GoldPrice,'</b></div>',
                                '<div class="col-50"><label>'+_("原副石工费")+'：</label><b>',data_parse.SideLaborFee,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("原副石价")+'：</label><b>',data_parse.SidePrice,'</b></div>',
                                '<div class="col-50"><label>'+_("原&nbsp;&nbsp;买&nbsp;&nbsp;耗%")+'：</label><b>',(data_parse.Wastage*100).toFixed(0),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("原&nbsp;&nbsp;工&nbsp;&nbsp;费")+'：</label><b>',data_parse.LaborFee,'</b></div>',
                                '<div class="col-50"><label>'+_("原&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;￥")+'：</label><b style="color:red">',formatRMBPrice(data.PurchaseRMB),'</b></div>',
                                '</div>',
                                inlaysettings_ReceiptStatus_CustomerNickName,
                                strInlaysettingsBalance_SalesUserName,
								strinlaysettingsPurchaseUserName_Supplier,
								strinlaysettingsShipNo_PaymentStatus,
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("下&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单")+'：</label><b>',DateTimeFormat(data.CreateTime),'</b></div>',
                                '<div class="col-50"><label>'+_("出&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;货")+'：</label><b>',DateFormat(data.ShipTime),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-100"><label>'+_("到&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;货")+'：</label><b>',DateFormat(data.ArrivalTime),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-100"><label>'+_("备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注")+'：</label><b>',data.Remarks,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-100"><label>'+_("详情")+'：</label><b>',data_parse.Details,'</b></div>',
                                '</div>',
                            ].join('');
						}
						$("#orderDetail").html($div);
						currentShow();  //币种设置
						$("#product_img_box").html($img);//图片
					}else{
						myApp.alert(res.msginfo);
					}
					myApp.hideIndicator();
				}
			});
		},
	}
	orderDetail.init();
})();
//根据权限显示
function roleShow(data,nameVal){
	
}
//订单状态
function getOrderStatus(val){
	var valtext="";
	if(val==1){
		valtext="下单成功";
	}else if(val==2){
		valtext="订购成功";
	}else if(val==3){
		valtext="到货成功";
	}else if(val==4){
		valtext="交货成功";
	}else if(val==5){
		valtext="作废成功";
	}else if(val==6){
		valtext="退货成功";
	}
	return _(valtext);
}

//翡翠类型
function getEmeraldType(type,val,na){
	var valText="";
	var jsonType=emerald_type_category
	if(jsonType[type][na]){
		var len=jsonType[type][na].length;
		for(var i=0;i<len;i++){
			if(val==jsonType[type][na][i][0]){
				valText= jsonType[type][na][i][1];
				break;
			}
		}
		if(valText==""){
			valText=val;
		}
		return _(valText)
	}else{
		return val==""?"-":val;
	}
	
}

//供应商联系方式
function Contact_Js(me) {
    myApp.showIndicator();
    $.ajax({
        url: "/Team/ContactSupplier",//提交地址
        type: "POST",//提交方式
        data: "{'SupplierCode':'" + me.getAttribute("value") + "'}",
        contentType: "application/json; charset=utf-8",
        success: function (result) {
            var _result = eval('(' + result + ')');//eval()解析单个json对象
            if (_result.msgcode == false) {
                myApp.alert(_result.msginfo);
            } else {
                var _result = eval('(' + _result + ')');//再次解析_result
                if (_result.result == true) {
                    $("#_company").val(_result.Company);
                    $("#_shortName").val(_result.ShortName);
                    $("#_website").val(_result.Contact.Website);//json.json.json
                    $("#_qq").val(_result.Contact.QQ);
                    $("#_name").val(_result.Contact.Name); //Telephone
                    $("#_telephone").val(_result.Contact.Telephone);
                    $("#_rapid").val(_result.Contact.RapID);
                    if (_result.Contact.Skype != "") {
                        $("#_skype").html("<b style='font-size:20px;' title='点击和" + _result.Contact.Skype +
                            "聊天'><span><img src='https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489148014986&di=253cba520b4b4c293c60f95cabd708db&imgtype=0&src=http%3A%2F%2Fimg.download.pchome.net%2F3p%2F7b%2Flogo.jpg' style='border: none;width:20px;height:20px;' /></span><label>" +
                            _result.Contact.Skype + "</label></b>");//点击打开Skype
                    } else {
                        $("#_skype").html("");
                    }
                    $("#_email").val(_result.Contact.Email);
                    $("#_wechat").val(_result.Contact.WeChat);
                    $("#_mobilephone").val(_result.Contact.MobilePhone);
                    $("#_address").val(_result.Address.Country + "-" + _result.Address.State + "-" + _result.Address.City);//中国-广东-深圳
                    myApp.popup(".Contact_box");
//                  $(".Contact_box").show();
                } else {
                    //暂无联系方式
                    myApp.alert(_("该供应商暂无联系方式"));
                }
            }
            myApp.hideIndicator();
        }
    });
}

